﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pcb.BLL
{
    public class OrdersBLL
    {

        public static string GetOrderList(string[] condition, int pageIndex, int pageSize, out int totalRecord)
        {
            totalRecord = 0;

            var list = Pcb.DAL.OrdersDAL.GetOrderList(condition, pageIndex, pageSize, out totalRecord);

            string json = Pcb.Common._Json.GetJson<DomainModel.t_orders>(list);
            json = "{\"total\":" + totalRecord + ",\"rows\":" + json + "}";
            return json;    
        }
    }
}
